const setPx = (style:any) => {
    // 处理px单位
    const newStyle:any = {};
    for (const key in style) {
        // eslint-disable-next-line no-prototype-builtins
        if (style.hasOwnProperty(key)) {
            const value = style[key];
            newStyle[key] = typeof value === 'number' ? value + 'px' : value
        }
    }
    return newStyle;
}

export default setPx;